using MediatR;
using RBAC.Domain.Dto.Output;
using RBAC.ErrorCode;
using RBAC.Read.Api.Application.Dto.ERP;
using System;

namespace RBAC.Read.Api.Application.Command.ERP.PurchasingManagement.PurchaseArrivalNotes
{
    /// <summary>
    /// 采购到货单主表列表（分页+条件）
    /// </summary>
    public class GetArrivalNotesListCommand : IRequest<APIPaging<ArrivalNoteListDto>>
    {
        public int PageIndex { get; set; } = 1;
        public int PageSize { get; set; } = 10;

        /// <summary>
        /// 单据编码（模糊）
        /// </summary>
        public string? DocCode { get; set; }
        /// <summary>
        /// 供应商（若主表仅存Id，这里传Id进行精确匹配；若想按名称，需要联表，已在另一个接口提供）
        /// </summary>
        public string? SupplierId { get; set; }
        /// <summary>
        /// 供应商名称（模糊，联表 Suppliers 后可用）
        /// </summary>
        public string? SupplierName { get; set; }
        /// <summary>
        /// 单据状态（精确）
        /// </summary>
        public string? DocStatus { get; set; }
        /// <summary>
        /// 单据日期-开始
        /// </summary>
        public DateTime? DocDateStart { get; set; }
        /// <summary>
        /// 单据日期-结束
        /// </summary>
        public DateTime? DocDateEnd { get; set; }
    }
}
